You need Jon Pugh's ScriptServer to run Script By Mail.
See http://www.infoworkshop.com/~jonpugh/
You need all of the above on your AutoShare Mac (plus AIMS on the same or another network Mac) to do scripting by e-mail.
With AutoShare and ScriptServer running, Script By Mail.app will turn the body of a mail message file into a running script, which will process just as if you started it up yourself.
The result of an AutoShare command in the script may be stored in a file in the docs/autoshare folder, and the file's name may be specified in the Command property of a File Mail command to AutoShare, so that the result is returned to you. If the script to be compiled encounters an error, you will be informed of this instead.
You *do* need to change a few properties at the beginning of the Script By Mail script and save it as an application named Script By Mail.app; a few properties *must* be changed in the Sample Script Text file as well.
I have included a sample called Sample Script Text, which you can put in the body of a mail message, but it *must* be changed in several ways (some properties and also the AutoShare command and its result), as it is merely a sample of how to do it.
The key to Script By Mail is the initial AutoShare command in your script. It gets processed, and the result is returned to you. Once you get comfortable with the environment, you can issue several commands and return the results from all of them. Actually, you can script other programs as well.
As a final note, I suggest that you make both the name of the AIMS account that you are sending the mail to and the name of the Result in the docs/autoshare folder difficult to guess! Actual password protection is also provided.